<h1>All elections</h1>
<% unless @open.empty? %>
  <h3>Open Elections</h3>
<ul>
<% @open.each do | elect | %>
  <li><%= elect.name %> [<%= link_to "vote!", :action=>'index', :id=>elect.id%>]
  [<%= link_to "results", :action=>'results', :id=>elect.id%>]</li>
<% end %>
</ul>
<% end %>
<% unless @closed.empty? %>
  <h3>Closed Elections</h3>
<ul>
<% @closed.each do | elect | %>
  <li><%= elect.name %> 
  [<%= link_to "results", :action=>'results', :id=>elect.id%>]</li>
<% end %>
</ul>
<% end %>